package god;

import java.util.Scanner;

public class J09Circle {
	public static void main(String[] args) {
		final double PI = 3.14;
		double radius[] = new double[2], area[] = new double[2], perimeter[] = new double[2];

		inputCircle(radius);
		getArea(area, radius, PI);
		getPerimeter(perimeter, radius, PI);

		System.out.println("원의 면적 = " + area[1]);
		System.out.println("원의 둘레 = " + perimeter[1]);
	}

	public static void inputCircle(double radius[]) {
		Scanner sc = new Scanner(System.in);
		System.out.println("반지름을 입력해 주세요");
		radius[1] = sc.nextDouble();
		sc.close();
	}
	public static void getArea(double area[], double radius[], double PI) {
		area[1] = radius[1] * radius[1] * PI;
	}

	public static void getPerimeter(double perimeter[], double radius[], double PI) {
		perimeter[1] = radius[1] * 2 * PI;

	}
}